<!DOCTYPE html>
<html>

	<head>
		<include file="Public/head" />
		<title>个人中心--{$config['store_name']}</title>
		<!-- BEGIN 样式文件 -->
		<link href="__STATIC__/css/ucenter.css" rel="stylesheet" type="text/css">
		<!-- END 样式文件 -->
		<!-- BEGIN JS文件 -->

		<!-- END JS文件 -->
	</head>

	<body>

		<include file="Public/header" />
		<!-- BEGIN 正式页面 -->
		<style type="text/css">
			.head_nav {
				line-height: 70px;
			}
			
			.top_bg {
				position: relative;
			}
		</style>
		<!--中间内容-->
		<div class="UMain">
			<div class="centerbox">
				<div class="cmain">
					<div class="Topnav">
						<span class="cur">个人中心</span><i>&gt;</i><span>  个人资料</span>
					</div>
					<div class="c_cont clearfix">
						<!--leftnav-->
						<include file="Public/center_left_menu"/>
						<!--leftnav end-->
						<div class="c_contr right">
							<div class="c_grzl pb5" <!--style="color:#6cadb8;-->">个人信息</div>
							<form id="fileupload" action="{:U('/Home/Controller/user')}" method="POST" enctype="multipart/form-data">
								<input type="hidden" name="doings" value="1">
								<div class="u_message pb20">
									<dl class="clearfix">
										<dt class="left">
												<div class="imgbox" ><img  src="__STATIC__/images/head_pic.jpg" class="useravart" height="148" width="148"></div>
												<div style="height: 150px;display:none;" onmouseout="hideico()" class="imgbox_1" id="upload_ico_btn" href="javascript:void(0);">修改头像</div>
												<p class="ico_info" style="color:red;display:none;"></p>
												<input type="file" id="ico_file" name="ico_file" style="width:0px; border:0px;" accept="image/*">
											</dt>
										<dd class="left">
											<ul class="clearfix">
												<li class="dtli_l">登 录 名：</li>
												<li class="dtli_r"></li>{$user.loginname}
											</ul>
											<ul class="clearfix">
												<li class="dtli_l">邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱：</li>
												<li class="dtli_r"></li>{$user.email}
											</ul>
											<ul class="clearfix">
												<li class="dtli_l">手 机 号：</li>
												<li class="dtli_r"></li>{$user.mobile}
											</ul>
										</dd>
									</dl>
								</div>
							</form>
							<div class="contit" <!--style="color:#6cadb8;-->">完善个人资料</div>
							<form class="ucenterForm" id="ucenterForm" method="post" novalidate="novalidate">
								<div class="c_contrcon c_contrcon_mm c_contrcon_md">
									<ul class="clearfix">
										<li class="mm_left"><i class="hxicon"></i>真实姓名：</li>
										<li class="mm_center" style="width:315px;">
											<input id="realname" name="realname" type="text" class="fx" value="{$user.realname}" style="width:315px;">
										</li>
										<li class="mm_right"></li>
									</ul>
									<ul class="clearfix">
										<li class="mm_left"><i class="hxicon"></i>昵称：</li>
										<li class="mm_center" style="width:315px;">
											<input id="nikename" name="nickname" type="text" class="fx" value="{$user.nickname}" style="width:315px;">
										</li>
										<li class="mm_right"></li>
									</ul>
									<ul class="clearfix">
										<li class="mm_left"><i class="hxicon"></i>手机号：</li>
										<li class="mm_center" style="width:315px;">
											<input id="telephone" name="mobile" type="text" class="fx" value="{$user.mobile}" style="width:315px;">
										</li>
										<li class="mm_right"></li>
									</ul>
									<ul class="clearfix">
										<li class="mm_left"><i class="hxicon"></i>邮箱：</li>
										<li class="mm_center" style="width:315px;"><input id="email" name="email" type="text" class="fx" value="{$user.email}" style="width:315px;"></li>
										<li class="mm_right"></li> 
									</ul>
									<div class="ucbtn"><input name="" type="button" value="保存" onclick="ucenter_ajax()" class="orangebtn submit_btn"></div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--<div class="zxtcbox zxtcbox_cg" id="zxtcbox_cg">
				<div class="zxtc">
					<div class="zc_tit">保存成功</div>
					<div>
						<a href="javascript:;" class="smbtn success_save" id="smbtn_2">确定</a>
					</div>
				</div>
			</div>-->

	</body>

	<script>
		function ucenter_ajax() {
			
			var data = $("#ucenterForm").serialize();
			var url = "{:U('User/ucenter_ajax')}";
			ajax(url, 'post', data, ucenter_back);

		}

		function ucenter_back(data) {
			if(data.status == 1) {
				layer.alert(data.msg, {
					icon: 1
				});
		setTimeout(function() {
				window.location.reload()
			}, 1000)
		
			} else {
				layer.alert(data.msg, {
					icon: 2
				});

			}
		}
	</script>

</html>